package com.lagou.rabbitmqtask.service;

import com.lagou.rabbitmqtask.dao.OrderDao;
import com.lagou.rabbitmqtask.pojo.Order;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class OrderService {

    @Autowired
    private OrderDao orderDao;

    public void addOrder(Order order) {
        orderDao.newOrder(order);
    }

    public List<Order> getOrderList() {
        return orderDao.getOrderList();
    }

    public void updateOrder(String order_id, String is_pay) {
        orderDao.updateOrder(order_id, is_pay);
    }
}
